import rest from '@/api/request'

export function userLogin(data: any) {
    return rest.post('/sys/login', data)
}

export function getUserInfo(page: number, pagesize: number) {
    return rest.get('/sys/role?page=' + page + '&pagesize=' + pagesize)
}

export function adduser(data: any) {
    return rest.post('/sys/role', data)
}

export function deluser(id: number) {
    return rest.delete(`/sys/role/${id}`)
}

export function edituser(id: number, index: any) {
    return rest.put(`/sys/role/${id}`, index)
}
//修改角色
export function editrole(id: string, data: any) {
    return rest.put(`/sys/role/${id}`, data)
}